\(\int \frac {9+6 x+x^2}{x^2} \, dx\) [2180]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 11 \[ \int \frac {9+6 x+x^2}{x^2} \, dx=-\frac {9}{x}+x+6 \log (x) \]

[Out]

-9/x+x+6*ln(x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {14} \[ \int \frac {9+6 x+x^2}{x^2} \, dx=x-\frac {9}{x}+6 \log (x) \]

[In]

Int[(9 + 6*x + x^2)/x^2,x]

[Out]

-9/x + x + 6*Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \left (1+\frac {9}{x^2}+\frac {6}{x}\right ) \, dx \\ & = -\frac {9}{x}+x+6 \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {9+6 x+x^2}{x^2} \, dx=-\frac {9}{x}+x+6 \log (x) \]

[In]

Integrate[(9 + 6*x + x^2)/x^2,x]

[Out]

-9/x + x + 6*Log[x]

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

method result size
default \(-\frac {9}{x}+x +6 \ln \left (x \right )\) \(12\)
risch \(-\frac {9}{x}+x +6 \ln \left (x \right )\) \(12\)
norman \(\frac {x^{2}-9}{x}+6 \ln \left (x \right )\) \(15\)
parallelrisch \(\frac {6 \ln \left (x \right ) x +x^{2}-9}{x}\) \(15\)

[In]

int((x^2+6*x+9)/x^2,x,method=_RETURNVERBOSE)

[Out]

-9/x+x+6*ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.27 \[ \int \frac {9+6 x+x^2}{x^2} \, dx=\frac {x^{2} + 6 \, x \log \left (x\right ) - 9}{x} \]

[In]

integrate((x^2+6*x+9)/x^2,x, algorithm="fricas")

[Out]

(x^2 + 6*x*log(x) - 9)/x

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.73 \[ \int \frac {9+6 x+x^2}{x^2} \, dx=x + 6 \log {\left (x \right )} - \frac {9}{x} \]

[In]

integrate((x**2+6*x+9)/x**2,x)

[Out]

x + 6*log(x) - 9/x

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {9+6 x+x^2}{x^2} \, dx=x - \frac {9}{x} + 6 \, \log \left (x\right ) \]

[In]

integrate((x^2+6*x+9)/x^2,x, algorithm="maxima")

[Out]

x - 9/x + 6*log(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09 \[ \int \frac {9+6 x+x^2}{x^2} \, dx=x - \frac {9}{x} + 6 \, \log \left ({\left | x \right |}\right ) \]

[In]

integrate((x^2+6*x+9)/x^2,x, algorithm="giac")

[Out]

x - 9/x + 6*log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {9+6 x+x^2}{x^2} \, dx=x+6\,\ln \left (x\right )-\frac {9}{x} \]

[In]

int((6*x + x^2 + 9)/x^2,x)

[Out]

x + 6*log(x) - 9/x